﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SAD
{
    public partial class Login : Form
    {
        SadPrincipal sadprincipal;
        
        public Login()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //if ((textBox1.Text == "admin") && (textBox2.Text == "admin"))
            if ((textBox1.Text == "") && (textBox2.Text == ""))
            {
                MessageBox.Show("Login correcto");
                this.Visible = false;

                //Application.Run(new SadPrincipal());
                //this.ShowDialog(new SadPrincipal());

                sadprincipal = new SadPrincipal();
                sadprincipal.ShowDialog(this);
                //sadprincipal.Visible = true;
                
                //this.Dispose();
                
            }
            else
            {
                MessageBox.Show("Datos incorrectos");
                textBox2.Text = "";
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
